package com.it.mapper;

import com.it.bean.Menu;
import com.it.bean.Role;
import com.it.dto.RoleDTO;
import com.it.vo.RoleVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.additional.insert.InsertListMapper;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

@Repository
public interface RoleMapper extends Mapper<Role>, InsertListMapper<Role> {
    List<RoleVo> selectJoin(RoleDTO queryBody);

    void insertRoleMenu(@Param("role") Role role, @Param("menus") List<Menu> menus);

    void deleteRoleMenu(@Param("roleId") Long roleId);

    void insertRoleMenuIds(@Param("roleId") Long roleId, @Param("menuIds") List<Long> menuIds);

    List<Long> auths(@Param("roleId") Long roleId);
}
